<?php
/*
接单或拒绝接单
*/
include('../conn.php');
// 需传参数
$ordersid = $_REQUEST[ordersid];
$state = $_REQUEST[state];
// 需传参数 end

if ($ordersid != '' && $state != '' && $state != 0) {
	$query = mysql_query("UPDATE goodsorders set state=".$state." where ordersid=".$ordersid);
	if (mysql_affected_rows()>0) {
		$arr = array('code' => 200, 'msg' => '更新成功' );
	}else{
		$arr = array('code' => 201, 'msg' => '未更新数据' );
	}
}else{
	$arr = array('code' => 400, 'msg' => 'ordersid或state不存在');
}
echo json_encode($arr);